
<button type="button" @onclick="Add">Increment</button>

@code
{
    // You need a Property + PropertyChanged event in combination to make the custom component data binding works
    [Parameter]
    public int Number { get; set;}

    [Parameter]
    public EventCallback<int> NumberChanged { get; set;}

    async Task Add()
    {
        Number++;
        await NumberChanged.InvokeAsync(Number);
    }
}